﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QuanLyThuNgan
{
    public class ThuocNoiTruDAO
    {
        //string sobn,int stt,int bdid,string dvt,float slg,float slgcosan,int dongia,float trigia,int langay,float slglan,int usageid, bool process,float slgtra, float slgphat,int dgtra,float slgsd, string dvsudung, string tgdung,string buoidung,string donvitinh, string DvSuDungUni, string TgDungUni,string BuoiDungUni, int giabhyt

        public string m_Insert_(string sobn, int stt, int bdid, string dvt, int slg, float slgcosan, int dongia, float trigia, int langay, float slglan, int usageid, float slgtra, int dgtra, float slgsd, string dvsudung, string tgdung, string buoidung, string donvitinh, string DvSuDungUni, string TgDungUni, string BuoiDungUni, int giabhyt)
        {
            string _sql = string.Format("exec  dbo.usp_ThuNgan_ThuocNoiTru_Insert '{0}',{1},{2},N'{3}',{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},N'{14}',N'{15}',N'{16}', N'{17}', N'{18}', N'{19}', N'{20}', {21}",
                                       sobn,  stt,  bdid,  dvt,  slg,  slgcosan,  dongia,  trigia,  langay,  slglan,  usageid,  slgtra,   dgtra,  slgsd,  dvsudung,  tgdung,  buoidung,  donvitinh,  DvSuDungUni,  TgDungUni,BuoiDungUni,giabhyt);
            return _sql;
        }
        public string m_Delete_(string sobn)
        {
            string _sql = string.Format("exec dbo.usp_ThuNgan_ThuocNoiTru_Delete '{0}'", sobn);
            return _sql;
        }
        public string m_Update_(string sobn, int stt, int bdid, string dvt, int slg, float slgcosan, int dongia, float trigia, int langay, float slglan, int usageid, float slgtra, int dgtra, float slgsd, string dvsudung, string tgdung, string buoidung, string donvitinh, string DvSuDungUni, string TgDungUni, string BuoiDungUni, int giabhyt)
        {
            string _sql = string.Format("exec  dbo.usp_ThuNgan_ThuocNoiTru_Update '{0}',{1},{2},N'{3}',{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},N'{14}',N'{15}',N'{16}', N'{17}', N'{18}', N'{19}', N'{20}', {21}",
                                       sobn,  stt,  bdid,  dvt,  slg,  slgcosan,  dongia,  trigia,  langay,  slglan,  usageid,  slgtra,   dgtra,  slgsd,  dvsudung,  tgdung,  buoidung,  donvitinh,  DvSuDungUni,  TgDungUni,BuoiDungUni,giabhyt);
            return _sql;
        }
        
        public string m_Update_TraThuoc(string sobn,int bdid,float  slgtra,int dongiatra,float slgsd)
        {
            string _sql = string.Format("exec dbo.usp_ThuNgan_ThuocNoiTru_Update_TraThuoc '{0}',{1},{2},{3},{4}", sobn,bdid,slgtra,dongiatra,slgsd);
            return _sql;
        }
    }
}
